pimpas.AJAX.Populate.Checkbox = Class.create( );
pimpas.Extends(pimpas.AJAX.Populate.Checkbox.prototype, pimpas.AJAX.Populate.Object.prototype);
pimpas.Extends(pimpas.AJAX.Populate.Checkbox.prototype,
   {
	   populate: function(xmlObject, xmlElement) {
		    this.log.log(pimpas.Log.INFO, 'Executing Checkbox Populate... Object: '+this.id);
			var entries = xmlObject.eval( new pimpas.XML.Xpath( '//values//value' ) );
			var id = xmlObject.getAsText( xmlObject.eval( new pimpas.XML.Xpath( 'id' ), xmlElement).iterateNext( ) );
			if(!pimpas.DOM.isCheckbox(id)) {
				this.log.log(pimpas.Log.ERROR, 	'The Object with ID ['+this.id+'] ITS NOT Checkbox!!!!');
				return;
			}
			
			pimpas.DOM.setObjectValue( id, null );
			var values = [];
			var i=0;
			var entry = null;
			while((entry=entries.iterateNext())!=null)
				values[i++] = xmlObject.getAsText( entry );
			
			pimpas.DOM.setObjectValue( id, values.join() );
	   }
   }
);